GXShutDown
QuickDraw GX sends theGXShutDown
message at the end of a print job. You can override theGXShutDown
message to clean up or dispose of any private storage you allocated in your override of theGXInitialize
message. Your override of theShutdown
message must match the following formal declaration:
OSErr MyShutDown (void);
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX sends theGXShutDown
message after a print job is complete. The printing context still exists when this message is sent.You need to override this message to deallocate any storage you were using within the context of the print job and deallocate the handle you placed into the context as a result of the
GXInitialize
message. TheGXShutDown
message is always the last message a message handler receives before it is removed from the message chain.The default implementation of the
GXShutDown
message deallocates memory that was allocated by the printing system.SPECIAL CONSIDERATIONS
You need to override theGXShutDown
message and deallocate storage if you have also overridden theGXInitialize
message.You never send the
GXShutDown
message yourself.You never forward the
GXShutDown
message to other message handlers.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. memFullErr There is not enough memory to retrieve the
tagged data.resNotFound The specified data could not be found. SEE ALSO
You can find examples of overrides of theGXShutDown
message in Listing 2-18 on page 2-31 in the chapter "Printing Extensions" and in Listing 3-18 on page 3-48 in the chapter "Printer Drivers."The
GXInitialize
message is described in the previous section.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help